<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>编辑信息</title>
    <link rel="stylesheet" href="../css/page-health-orderInfo.css"/>
    <link rel="stylesheet" href="../plugins/elementui/index.css"/>
    <script src="../plugins/jquery/dist/jquery.min.js"></script>
    <script src="../plugins/healthmobile.js"></script>
    <script src="../plugins/datapicker/datePicker.js"></script>
    <script src="../plugins/vue/vue.js"></script>
    <script src="../plugins/vue/axios-0.18.0.js"></script>
    <script src="../plugins/elementui/index.js"></script>

    <style>

        .td_left {
            width: 100px;
            text-align: right;
            height: 45px;
        }

        .td_right {
            padding-left: 50px;
        }

        #companyName, #name, #age, #idCard, #nativePlace, #presentAddress, #backTime, #phoneNum {
            width: 250px;
            height: 30px;
            border: 1px solid #A6A6A6;
            border-radius: 5px;
            padding-left: 10px;
        }

        #sbt {
            width: 150px;
            height: 40px;
            background-color: #1E90FF;
            border: 1px solid #1E90FF;
        }

        .error {
            color: red;
            vertical-align: middle;
        }

    </style>
</head>
<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div id="app" class="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
        <span class="center">传智健康</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <!-- 页面内容 -->
    <h1>企业人员情况统计</h1>
    <p>我司将会对收集的数据进行保密,谢谢大家的配合</p>
    <div>
        <div class="form_action">
            <form>
                <table>
                    <tr>
                    <tr class="td_left"><label for="companyName">1.企业名称</label></tr>
                    <br>
                    <tr class="td_right"><input v-model="info.companyName" type="text" name="companyName"
                                                id="companyName">
                        <span id="s_companyName" class="error"></span></tr>
                    </tr><br><br>

                    <tr>
                    <tr class="td_left"><label for="name">2.姓名</label></tr>
                    <br>
                    <tr class="td_right"><input v-model="info.name" type="text" name="name" id="name">
                        <span id="s_name" class="error"></span></tr>
                    </tr><br><br>

                    <tr>
                    <tr class="td_left"><label>3.性别</label></tr>
                    <br>
                    <tr class="td_right">
                        <input v-model="info.gender" type="radio" name="gender" value="male"> 男
                        <br>
                        <input v-model="info.gender" type="radio" name="gender" value="female"> 女
                    </tr>
                    </tr><br><br>


                    <tr>
                    <tr class="td_left"><label for="age">4.年龄</label></tr>
                    <br>
                    <tr class="td_right"><input v-model="info.age" type="text" name="age" id="age">
                        <span id="s_age" class="error"></span></tr>
                    </tr><br><br>

                    <tr>
                    <tr class="td_left"><label for="idCard">5.身份证号</label></tr>
                    <br>
                    <tr class="td_right"><input v-model="info.idCard" type="text" name="idCard" id="idCard">
                        <span id="s_idCard" class="error"></span></tr>
                    </tr><br><br>

                    <tr>
                    <tr class="td_left"><label for="nativePlace">6.籍贯</label></tr>
                    <br>
                    <tr class="td_right"><input v-model="info.nativePlace" type="text" name="nativePlace"
                                                id="nativePlace">
                        <span id="s_nativePlace" class="error"></span></tr>
                    </tr><br><br>

                    <tr>
                    <tr class="td_left"><label for="presentAddress">7.现居住地</label></tr>
                    <br>
                    <tr class="td_right"><input v-model="info.presentAddress" type="text" name="presentAddress"
                                                id="presentAddress">
                        <span id="s_presentAddress" class="error"></span></tr>
                    </tr><br><br>

                    <tr>
                    <tr class="td_left"><label>8.是否在宁</label></tr>
                    <br>
                    <tr class="td_right">
                        <input v-model="info.isInNing" type="radio" name="isInNing" value="yes" > 是
                        <br>
                        <input v-model="info.isInNing" type="radio" name="isInNing" value="no"> 否
                    </tr>
                    </tr><br><br>

                    <tr>
                    <tr class="td_left"><label>9.是否接触湖北人员</label></tr>
                    <br>
                    <tr class="td_right">
                        <input v-model="info.isTouchedHB" type="radio" name="isTouchedHB" value="yes" > 是
                        <br>
                        <input v-model="info.isTouchedHB" type="radio" name="isTouchedHB" value="no"> 否
                    </tr>
                    </tr><br><br>

                    <tr>
                    <tr class="td_left"><label>10.是否接触浙江温州人员</label></tr>
                    <br>
                    <tr class="td_right">
                        <input v-model="info.isTouchedZJ" type="radio" name="isTouchedZJ" value="yes" > 是
                        <br>
                        <input v-model="info.isTouchedZJ" type="radio" name="isTouchedZJ" value="no"> 否
                    </tr>
                    </tr><br><br>

                    <tr>
                    <tr class="td_left"><label>11.目前症状</label></tr>
                    <br>
                    <tr class="td_right">
                        <input v-model="info.currentSymptoms" type="radio" name="currentSymptoms" value="good" > 良好
                        <br>
                        <input v-model="info.currentSymptoms" type="radio" name="currentSymptoms" value="bad"> 有不良症状（发烧、呼吸困难等）
                    </tr>
                    </tr><br><br>


                    <tr>
                    <tr class="td_left"><label for="backTime">12.预计复工时间</label></tr>
                    <br>
                    <tr class="td_right"><input v-model="info.backTime" type="date" name="backTime" id="backTime" placeholder="请输入出生日期">
                    </tr>
                    </tr><br><br>

                    <tr>
                    <tr class="td_left"><label for="phoneNum">13.联系方式</label></tr>
                    <br>
                    <tr class="td_right"><input v-model="info.phoneNum" type="text" name="phoneNum" id="phoneNum">
                        <span id="s_phoneNum" class="error"></span></tr>
                    </tr><br><br>

                    <tr>
                    <tr class="td_left"><label>14.本人承诺对此次调查的真实性负责</label></tr>
                    <br>
                    <tr class="td_right">
                        <input v-model="info.commitment" type="radio" name="commitment" value="yes">是
                    </tr>
                    </tr><br><br>

                    <tr colspan="2" align="center"><button @click="submit()" type="button" id="sbt">提交</button></tr>
                </table>
            </form>

        </div>
    </div>
</div>
<script>
    var vue = new Vue({
        el: '#app',
        data: {
            info: {
                gender:"male",
                isInNing:"yes",
                isTouchedHB:"yes",
                isTouchedZJ:"yes",
                currentSymptoms:"good"
            }//表单信息
        },
        methods: {
            //提交信息
            submit(){
                //发送ajax请求，将数据提交到Controller
                axios.post("/submitInfo/submit.do",this.info).then((res) => {
                    if (res.data.flag){
                        //提交成功
                        window.location.href = "/pages/index.html";
                    }else{
                        //提交失败
                        this.$message.error(res.data.message)
                    }
                });
            }
        },
    });
</script>
</body>
</html>